package cn.com.infostrategy.ui.mdata.formatcomp;

import java.util.Stack;

import org.nfunk.jep.ParseException;
import org.nfunk.jep.function.PostfixMathCommand;

import cn.com.infostrategy.ui.mdata.BillFormatPanel;
import cn.com.infostrategy.ui.report.BillReportPanel;

public class GetRegisterBillReportPanel extends PostfixMathCommand {
	private BillFormatPanel formatpanel = null; //

	public GetRegisterBillReportPanel(BillFormatPanel _billreportpanel) {
		this.formatpanel = _billreportpanel; //
		numberOfParameters = 2; //
	}

	public void run(Stack inStack) throws ParseException {
		Object param_1 = inStack.pop();
		String classname = "";
		Object param_2 = inStack.pop();
		String templetCode = "";
		if (param_1 != null) {
			classname = (String) param_1; //
		}
		if (param_2 != null) {
			templetCode = (String) param_2; //
		}

		BillReportPanel reportPanel = new BillReportPanel(templetCode, classname); //

		String _returnkey = "billreport_" + formatpanel.getCompentSeq(); //
		formatpanel.getPanelMap().put(_returnkey, reportPanel); ////
		inStack.push(_returnkey); //
	}
}
